window.onscroll = function(){
    //st：滚动上去的高度
    var st = document.documentElement.scrollTop||document.body.scrollTop;
    if(st>fix_test.offsetHeight){
        fixed.style.position="fixed"

    }else{
        fixed.style.position="static"/* 默认静止static */

    }
}

//返回顶部
function toTop(){
    var st = document.documentElement.scrollTop||document.body.scrollTop;
    window.scrollTo(0, 0);

}